package com.java.module.fire.controller.api;

import com.java.common.lang.annotation.Log;
import com.java.common.lang.domain.AjaxResult;
import com.java.common.lang.enums.BusinessTypeEnum;
import com.java.common.service.ApiTokenService;
import com.java.common.utils.WebKit;
import com.java.module.fire.domain.Uninterested;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.java.module.fire.service.IUninterestedService;

/**
 * 不感兴趣Controller
 * 
 * @author Administrator
 * @date 2025-06-23
 */
@RestController("ApiUninterestedController")
@RequestMapping("/fire/uninterested")
public class UninterestedController {

    @Autowired
    IUninterestedService uninterestedService;

    @Autowired
    ApiTokenService apiTokenService;

    /**
     * 新增不感兴趣
     */
    @Log(title = "不感兴趣", businessType = BusinessTypeEnum.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody Uninterested uninterested) {
        uninterested.setUid(apiTokenService.getLoginUserId());
        return WebKit.toAjax(uninterestedService.insertUninterested(uninterested));
    }

}